package com.darren.euc.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name = "euc_clue_follows")
public class ClueFollow implements Serializable {

	private static final long serialVersionUID = 7225410464606595171L;

	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	//@Column(name = "clue_id")
	//private Integer clueId;

	@Column(name = "order_id")
	private Integer orderId;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@Column(name = "visit_time")
	private Date visitTime;

	@Column(name = "contact")
	private String contact;

	@Column(name = "contact_number")
	private String contactNumber;
	@Column(name = "clue_id")
	private Integer clueId;


	@ManyToOne(targetEntity = ClientClassification.class, fetch = FetchType.EAGER)
	@JoinColumn(name = "client_classification_id", referencedColumnName = "id")
	private ClientClassification clientClassification;

	@ManyToOne(targetEntity = User.class, fetch = FetchType.EAGER)
	@JoinColumn(name = "follow_user_id", referencedColumnName = "user_id")
	private User followUser;

	@Column(name = "follow_content")
	private String followContent;

	@Column(name = "continues")
	private boolean continues = true;

	@Column(name = "reason")
	private String reason;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}


	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public Integer getClueId() {
		return clueId;
	}

	public void setClueId(Integer clueId) {
		this.clueId = clueId;
	}


	public Date getVisitTime() {
		return visitTime;
	}

	public void setVisitTime(Date visitTime) {
		this.visitTime = visitTime;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getContactNumber() {
		return contactNumber;
	}

	public void setContactNumber(String contactNumber) {
		this.contactNumber = contactNumber;
	}

	public ClientClassification getClientClassification() {
		return clientClassification;
	}

	public void setClientClassification(ClientClassification clientClassification) {
		this.clientClassification = clientClassification;
	}

	public User getFollowUser() {
		return followUser;
	}

	public void setFollowUser(User followUser) {
		this.followUser = followUser;
	}

	public String getFollowContent() {
		return followContent;
	}

	public void setFollowContent(String followContent) {
		this.followContent = followContent;
	}

	public boolean isContinues() {
		return continues;
	}

	public void setContinues(boolean continues) {
		this.continues = continues;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

}
